{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 课程论文"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " 请务必交到exer8文件夹下，**谢绝交到master下**\n",
    "+ 请不要改动任何文件，拜托\n",
    "+ 请于12月30日前先在github上提交\n",
    "+ 请在元旦后提交纸质版，将本页面文件先打印为pdf格式，再去打印店付印\n",
    "+ 请将论文模板和本页面文件一起装订，前者放上面，本页面文件放下面\n",
    "+ 纸质版提交时间和地点请留意微信群通知"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "请写一下姓名和学号：\n",
    "+ 姓名  黄鹏辉\n",
    "+ 学号 0161918"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 样本均值分布的统计试验"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "+ 请将CEPS.csv数据读入python\n",
    "+ 请从中随机抽取1000个数据\n",
    "+ 请根据问卷从数据中挑选两个连续型变量（likert量表可以近似看作连续变量）\n",
    "+ 计算这两个连续变量的均值\n",
    "+ 重复随机抽取—计算均值这个过程30次，得到两个变量30个样本均值\n",
    "+ 绘制这30个样本均值的直方图\n",
    "+ 计算均值的均值和标准误"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib\n",
    "from matplotlib.ticker import MultipleLocator, FormatStrFormatter\n",
    "plt.rcParams['font.sans-serif']=['SimHei']\n",
    "plt.rcParams['axes.unicode_minus']=False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\97657\\Anaconda3\\lib\\site-packages\\IPython\\core\\interactiveshell.py:2785: DtypeWarning: Columns (20,22,23,25,28,29,39,49,74,124,125,126,127,128,129,130,131,138,140,141,147,160,161,162,165,170,174,175,176,177,179,180,181,182,183,184,188,191,194,195,196,199,221,222,223,224,251,252,254,289,290,294,295,296) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  interactivity=interactivity, compiler=compiler, result=result)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ids</th>\n",
       "      <th>clsids</th>\n",
       "      <th>schids</th>\n",
       "      <th>ctyids</th>\n",
       "      <th>frame</th>\n",
       "      <th>subsample</th>\n",
       "      <th>sweight</th>\n",
       "      <th>fall</th>\n",
       "      <th>grade9</th>\n",
       "      <th>stcog</th>\n",
       "      <th>...</th>\n",
       "      <th>steco_3c</th>\n",
       "      <th>stonly</th>\n",
       "      <th>stsib</th>\n",
       "      <th>stsibrank</th>\n",
       "      <th>stmedu</th>\n",
       "      <th>stfedu</th>\n",
       "      <th>stprhedu</th>\n",
       "      <th>stfdrunk</th>\n",
       "      <th>stprfight</th>\n",
       "      <th>stprrel</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>218.738892</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>216.518234</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>8</td>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>216.518234</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>218.738892</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>217.553040</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 300 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   ids  clsids  schids  ctyids  frame  subsample     sweight  fall  grade9  \\\n",
       "0    1       1       1       1      3          3  218.738892     0       0   \n",
       "1    2       1       1       1      3          3  216.518234     0       0   \n",
       "2    3       1       1       1      3          3  216.518234     0       0   \n",
       "3    4       1       1       1      3          3  218.738892     0       0   \n",
       "4    5       1       1       1      3          3  217.553040     0       0   \n",
       "\n",
       "   stcog   ...    steco_3c stonly stsib stsibrank stmedu stfedu stprhedu  \\\n",
       "0     11   ...           3      1                      3      3        3   \n",
       "1     17   ...           2      1                      8      5        8   \n",
       "2     12   ...           2      2     1         3      3      3        3   \n",
       "3     10   ...           2      1                      6      7        7   \n",
       "4     10   ...           3      1                      7      8        8   \n",
       "\n",
       "  stfdrunk stprfight stprrel  \n",
       "0        1         1       2  \n",
       "1        1         1       2  \n",
       "2        1         1       1  \n",
       "3        1         1       2  \n",
       "4        1         1       2  \n",
       "\n",
       "[5 rows x 300 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#导入数据后面选择的是a16,和a17所以在这里把他们取出来做缺失值的处理\n",
    "sentinels= {'a16': [' '], 'a17': [' ']}\n",
    "df = pd.read_csv('CEPS.csv',encoding='gb2312',na_values=sentinels)\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ids</th>\n",
       "      <th>clsids</th>\n",
       "      <th>schids</th>\n",
       "      <th>ctyids</th>\n",
       "      <th>frame</th>\n",
       "      <th>subsample</th>\n",
       "      <th>sweight</th>\n",
       "      <th>fall</th>\n",
       "      <th>grade9</th>\n",
       "      <th>stcog</th>\n",
       "      <th>...</th>\n",
       "      <th>steco_3c</th>\n",
       "      <th>stonly</th>\n",
       "      <th>stsib</th>\n",
       "      <th>stsibrank</th>\n",
       "      <th>stmedu</th>\n",
       "      <th>stfedu</th>\n",
       "      <th>stprhedu</th>\n",
       "      <th>stfdrunk</th>\n",
       "      <th>stprfight</th>\n",
       "      <th>stprrel</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>16577</th>\n",
       "      <td>16578</td>\n",
       "      <td>387</td>\n",
       "      <td>100</td>\n",
       "      <td>25</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1614.552246</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19047</th>\n",
       "      <td>19048</td>\n",
       "      <td>432</td>\n",
       "      <td>111</td>\n",
       "      <td>28</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>334.988861</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1911</th>\n",
       "      <td>1912</td>\n",
       "      <td>51</td>\n",
       "      <td>13</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1610.889771</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13350</th>\n",
       "      <td>13351</td>\n",
       "      <td>311</td>\n",
       "      <td>80</td>\n",
       "      <td>20</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>319.091095</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19034</th>\n",
       "      <td>19035</td>\n",
       "      <td>432</td>\n",
       "      <td>111</td>\n",
       "      <td>28</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>338.424561</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17302</th>\n",
       "      <td>17303</td>\n",
       "      <td>400</td>\n",
       "      <td>103</td>\n",
       "      <td>26</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3368.456055</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4821</th>\n",
       "      <td>4822</td>\n",
       "      <td>129</td>\n",
       "      <td>33</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>73.548485</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>16</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10540</th>\n",
       "      <td>10541</td>\n",
       "      <td>257</td>\n",
       "      <td>67</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2151.991943</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17116</th>\n",
       "      <td>17117</td>\n",
       "      <td>397</td>\n",
       "      <td>102</td>\n",
       "      <td>26</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3422.799561</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>13</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>140</th>\n",
       "      <td>141</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>202.043365</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>4</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8555</th>\n",
       "      <td>8556</td>\n",
       "      <td>217</td>\n",
       "      <td>56</td>\n",
       "      <td>14</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>431.156494</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1692</th>\n",
       "      <td>1693</td>\n",
       "      <td>45</td>\n",
       "      <td>12</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2357.637939</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>16</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1766</th>\n",
       "      <td>1767</td>\n",
       "      <td>46</td>\n",
       "      <td>12</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2357.637939</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2342</th>\n",
       "      <td>2343</td>\n",
       "      <td>60</td>\n",
       "      <td>15</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1711.570312</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>107</th>\n",
       "      <td>108</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>269.932678</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2310</th>\n",
       "      <td>2311</td>\n",
       "      <td>59</td>\n",
       "      <td>15</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1711.570312</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10518</th>\n",
       "      <td>10519</td>\n",
       "      <td>256</td>\n",
       "      <td>67</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2151.991943</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14761</th>\n",
       "      <td>14762</td>\n",
       "      <td>343</td>\n",
       "      <td>89</td>\n",
       "      <td>23</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>319.196960</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>456</th>\n",
       "      <td>457</td>\n",
       "      <td>17</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>219.780060</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>513</th>\n",
       "      <td>514</td>\n",
       "      <td>18</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>222.034149</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16979</th>\n",
       "      <td>16980</td>\n",
       "      <td>395</td>\n",
       "      <td>102</td>\n",
       "      <td>26</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3535.297119</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14602</th>\n",
       "      <td>14603</td>\n",
       "      <td>339</td>\n",
       "      <td>88</td>\n",
       "      <td>22</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3060.337402</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17393</th>\n",
       "      <td>17394</td>\n",
       "      <td>402</td>\n",
       "      <td>103</td>\n",
       "      <td>26</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>5043.308105</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13576</th>\n",
       "      <td>13577</td>\n",
       "      <td>315</td>\n",
       "      <td>81</td>\n",
       "      <td>21</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3532.871582</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6256</th>\n",
       "      <td>6257</td>\n",
       "      <td>166</td>\n",
       "      <td>43</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>256.535583</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6294</th>\n",
       "      <td>6295</td>\n",
       "      <td>167</td>\n",
       "      <td>43</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>268.368378</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7960</th>\n",
       "      <td>7961</td>\n",
       "      <td>204</td>\n",
       "      <td>53</td>\n",
       "      <td>14</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>295.579559</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18221</th>\n",
       "      <td>18222</td>\n",
       "      <td>416</td>\n",
       "      <td>107</td>\n",
       "      <td>27</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2778.829590</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10788</th>\n",
       "      <td>10789</td>\n",
       "      <td>261</td>\n",
       "      <td>68</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2222.972412</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13306</th>\n",
       "      <td>13307</td>\n",
       "      <td>310</td>\n",
       "      <td>80</td>\n",
       "      <td>20</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>319.091095</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6769</th>\n",
       "      <td>6770</td>\n",
       "      <td>176</td>\n",
       "      <td>46</td>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1849.120483</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5618</th>\n",
       "      <td>5619</td>\n",
       "      <td>149</td>\n",
       "      <td>38</td>\n",
       "      <td>10</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>69.388588</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2131</th>\n",
       "      <td>2132</td>\n",
       "      <td>55</td>\n",
       "      <td>14</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1883.531372</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2945</th>\n",
       "      <td>2946</td>\n",
       "      <td>75</td>\n",
       "      <td>19</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>204.042770</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15373</th>\n",
       "      <td>15374</td>\n",
       "      <td>357</td>\n",
       "      <td>92</td>\n",
       "      <td>23</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>683.496338</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11327</th>\n",
       "      <td>11328</td>\n",
       "      <td>271</td>\n",
       "      <td>70</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2327.478027</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6420</th>\n",
       "      <td>6421</td>\n",
       "      <td>169</td>\n",
       "      <td>44</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>115.578056</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>183</th>\n",
       "      <td>184</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>208.862442</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>16</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18468</th>\n",
       "      <td>18469</td>\n",
       "      <td>422</td>\n",
       "      <td>108</td>\n",
       "      <td>27</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3460.576416</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4219</th>\n",
       "      <td>4220</td>\n",
       "      <td>109</td>\n",
       "      <td>28</td>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>337.216217</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>16</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13580</th>\n",
       "      <td>13581</td>\n",
       "      <td>315</td>\n",
       "      <td>81</td>\n",
       "      <td>21</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4033.718506</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17896</th>\n",
       "      <td>17897</td>\n",
       "      <td>410</td>\n",
       "      <td>105</td>\n",
       "      <td>27</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2716.253662</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "      <td>4</td>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18923</th>\n",
       "      <td>18924</td>\n",
       "      <td>430</td>\n",
       "      <td>110</td>\n",
       "      <td>28</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>354.653076</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15030</th>\n",
       "      <td>15031</td>\n",
       "      <td>348</td>\n",
       "      <td>90</td>\n",
       "      <td>23</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>334.489166</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8470</th>\n",
       "      <td>8471</td>\n",
       "      <td>215</td>\n",
       "      <td>56</td>\n",
       "      <td>14</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>293.782898</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>16</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10945</th>\n",
       "      <td>10946</td>\n",
       "      <td>264</td>\n",
       "      <td>69</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2285.787598</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1490</th>\n",
       "      <td>1491</td>\n",
       "      <td>41</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2550.557861</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>16</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15704</th>\n",
       "      <td>15705</td>\n",
       "      <td>365</td>\n",
       "      <td>94</td>\n",
       "      <td>24</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>348.118011</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>161</th>\n",
       "      <td>162</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>208.862442</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10745</th>\n",
       "      <td>10746</td>\n",
       "      <td>260</td>\n",
       "      <td>68</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2222.972656</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4953</th>\n",
       "      <td>4954</td>\n",
       "      <td>132</td>\n",
       "      <td>33</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>79.937164</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4498</th>\n",
       "      <td>4499</td>\n",
       "      <td>119</td>\n",
       "      <td>30</td>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>127.349869</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6249</th>\n",
       "      <td>6250</td>\n",
       "      <td>166</td>\n",
       "      <td>43</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>268.368378</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1760</th>\n",
       "      <td>1761</td>\n",
       "      <td>46</td>\n",
       "      <td>12</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2357.637939</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3098</th>\n",
       "      <td>3099</td>\n",
       "      <td>78</td>\n",
       "      <td>20</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>169.141174</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3954</th>\n",
       "      <td>3955</td>\n",
       "      <td>98</td>\n",
       "      <td>25</td>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>325.913177</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11020</th>\n",
       "      <td>11021</td>\n",
       "      <td>266</td>\n",
       "      <td>69</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2486.153076</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8595</th>\n",
       "      <td>8596</td>\n",
       "      <td>218</td>\n",
       "      <td>57</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3161.228516</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10881</th>\n",
       "      <td>10882</td>\n",
       "      <td>263</td>\n",
       "      <td>68</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2118.129639</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3355</th>\n",
       "      <td>3356</td>\n",
       "      <td>83</td>\n",
       "      <td>21</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3697.687012</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1000 rows × 300 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         ids  clsids  schids  ctyids  frame  subsample      sweight  fall  \\\n",
       "16577  16578     387     100      25      1          1  1614.552246     1   \n",
       "19047  19048     432     111      28      3          3   334.988861     1   \n",
       "1911    1912      51      13       4      1          1  1610.889771     1   \n",
       "13350  13351     311      80      20      3          3   319.091095     0   \n",
       "19034  19035     432     111      28      3          3   338.424561     1   \n",
       "17302  17303     400     103      26      1          1  3368.456055     0   \n",
       "4821    4822     129      33       9      2          2    73.548485     1   \n",
       "10540  10541     257      67      17      1          1  2151.991943     1   \n",
       "17116  17117     397     102      26      1          1  3422.799561     0   \n",
       "140      141       5       2       1      3          3   202.043365     0   \n",
       "8555    8556     217      56      14      3          3   431.156494     0   \n",
       "1692    1693      45      12       3      1          1  2357.637939     0   \n",
       "1766    1767      46      12       3      1          1  2357.637939     0   \n",
       "2342    2343      60      15       4      1          1  1711.570312     1   \n",
       "107      108       4       1       1      3          3   269.932678     0   \n",
       "2310    2311      59      15       4      1          1  1711.570312     1   \n",
       "10518  10519     256      67      17      1          1  2151.991943     1   \n",
       "14761  14762     343      89      23      3          3   319.196960     0   \n",
       "456      457      17       5       2      3          3   219.780060     0   \n",
       "513      514      18       5       2      3          3   222.034149     0   \n",
       "16979  16980     395     102      26      1          1  3535.297119     0   \n",
       "14602  14603     339      88      22      1          1  3060.337402     0   \n",
       "17393  17394     402     103      26      1          1  5043.308105     0   \n",
       "13576  13577     315      81      21      1          1  3532.871582     1   \n",
       "6256    6257     166      43      11      3          3   256.535583     1   \n",
       "6294    6295     167      43      11      3          3   268.368378     1   \n",
       "7960    7961     204      53      14      3          3   295.579559     0   \n",
       "18221  18222     416     107      27      1          1  2778.829590     1   \n",
       "10788  10789     261      68      17      1          1  2222.972412     1   \n",
       "13306  13307     310      80      20      3          3   319.091095     0   \n",
       "...      ...     ...     ...     ...    ...        ...          ...   ...   \n",
       "6769    6770     176      46      12      1          1  1849.120483     1   \n",
       "5618    5619     149      38      10      3          2    69.388588     1   \n",
       "2131    2132      55      14       4      1          1  1883.531372     1   \n",
       "2945    2946      75      19       5      3          3   204.042770     0   \n",
       "15373  15374     357      92      23      3          3   683.496338     0   \n",
       "11327  11328     271      70      18      1          1  2327.478027     1   \n",
       "6420    6421     169      44      11      3          3   115.578056     1   \n",
       "183      184       6       2       1      3          3   208.862442     0   \n",
       "18468  18469     422     108      27      1          1  3460.576416     1   \n",
       "4219    4220     109      28       7      2          2   337.216217     1   \n",
       "13580  13581     315      81      21      1          1  4033.718506     1   \n",
       "17896  17897     410     105      27      1          1  2716.253662     1   \n",
       "18923  18924     430     110      28      3          3   354.653076     1   \n",
       "15030  15031     348      90      23      3          3   334.489166     0   \n",
       "8470    8471     215      56      14      3          3   293.782898     0   \n",
       "10945  10946     264      69      18      1          1  2285.787598     1   \n",
       "1490    1491      41      11       3      1          1  2550.557861     0   \n",
       "15704  15705     365      94      24      3          3   348.118011     0   \n",
       "161      162       6       2       1      3          3   208.862442     0   \n",
       "10745  10746     260      68      17      1          1  2222.972656     1   \n",
       "4953    4954     132      33       9      2          2    79.937164     1   \n",
       "4498    4499     119      30       8      2          2   127.349869     1   \n",
       "6249    6250     166      43      11      3          3   268.368378     1   \n",
       "1760    1761      46      12       3      1          1  2357.637939     0   \n",
       "3098    3099      78      20       5      3          3   169.141174     0   \n",
       "3954    3955      98      25       7      2          2   325.913177     1   \n",
       "11020  11021     266      69      18      1          1  2486.153076     1   \n",
       "8595    8596     218      57      15      1          1  3161.228516     1   \n",
       "10881  10882     263      68      17      1          1  2118.129639     1   \n",
       "3355    3356      83      21       6      1          1  3697.687012     1   \n",
       "\n",
       "       grade9  stcog   ...    steco_3c stonly stsib stsibrank stmedu stfedu  \\\n",
       "16577       0     14   ...           1      2     2         3      2      3   \n",
       "19047       0      5   ...           2      1                      7      7   \n",
       "1911        1      6   ...           2      2     1         1      3      3   \n",
       "13350       1      8   ...           3      2     2         2      4      3   \n",
       "19034       0     13   ...           3      1                      4      6   \n",
       "17302       0      2   ...           1      2                      1      2   \n",
       "4821        0     16   ...           2      1                      4      4   \n",
       "10540       0      7   ...           1      1                      3      3   \n",
       "17116       1     13   ...           1      2     2         2      1      6   \n",
       "140         0     14   ...           3      1                      4      8   \n",
       "8555        1      7   ...           2      2     1         1      6      6   \n",
       "1692        0     16   ...           3      1                      3      3   \n",
       "1766        0      7   ...           2      2     1         1      7      3   \n",
       "2342        1     11   ...           1      2     1         1      6      3   \n",
       "107         1     10   ...           2      1                      8      8   \n",
       "2310        1     12   ...           2      1                      4      4   \n",
       "10518       0     13   ...           3      1                      3      4   \n",
       "14761       0     11   ...           2      2     1         3      2      3   \n",
       "456         0     13   ...           2      2     2         3      2      2   \n",
       "513         0      9   ...           2      2     1         1      3      3   \n",
       "16979       0      7   ...           2      2     1         3      1      2   \n",
       "14602       0      9   ...           2      2     2         2      3      3   \n",
       "17393       1      3   ...           1      2     2         3      2      3   \n",
       "13576       1      7   ...           1      2     1         1      2      2   \n",
       "6256        1      9   ...           2      1                      3      6   \n",
       "6294        1      5   ...           2      1                      3      3   \n",
       "7960        1     10   ...           3      2     1         1      6      6   \n",
       "18221       0      6   ...           1      2     1         3      3      3   \n",
       "10788       0     11   ...           2      2     1         1      3      2   \n",
       "13306       1      2   ...           2      2     1         3      3      3   \n",
       "...       ...    ...   ...         ...    ...   ...       ...    ...    ...   \n",
       "6769        1      7   ...           2      1                      3      3   \n",
       "5618        1      9   ...           2      1                      3      3   \n",
       "2131        1     10   ...           1      2     4         2      6      3   \n",
       "2945        1      9   ...           2      1                      3      3   \n",
       "15373       1     11   ...           2      2     1         3      6      6   \n",
       "11327       1      8   ...           2      1                      3      3   \n",
       "6420        1     10   ...           1      2     1         1      2      6   \n",
       "183         0     16   ...           2      1                      8      7   \n",
       "18468       1      7   ...           1      2     1         3      3      2   \n",
       "4219        0     16   ...           2      1                      8      9   \n",
       "13580       1      7   ...           1      2     1         1      3      6   \n",
       "17896       1      7   ...           2      2     1         3      7      4   \n",
       "18923       1     11   ...           1      2     1         3      3      5   \n",
       "15030       0     14   ...           3      2     1         1      4      7   \n",
       "8470        0     16   ...           2      1                      3      2   \n",
       "10945       0     11   ...           2      2     2         1      3      3   \n",
       "1490        0     16   ...           2      1                      3      6   \n",
       "15704       1      7   ...           2      1                      2      3   \n",
       "161         0     15   ...           2      1                      3      4   \n",
       "10745       0     15   ...           2      2     1         1      2      2   \n",
       "4953        1      5   ...           2      1                      3      3   \n",
       "4498        1     12   ...           2      1                      3      3   \n",
       "6249        1     14   ...           3      2     1         1      2      3   \n",
       "1760        0      9   ...           2      2     1         3      2      3   \n",
       "3098        0     11   ...           1      1                      3      3   \n",
       "3954        0     13   ...           2      1                      6      6   \n",
       "11020       1     10   ...           2      2     1         1      3      3   \n",
       "8595        0     14   ...           2      2     1         1      4      2   \n",
       "10881       1      4   ...           1      2     1         1      2      3   \n",
       "3355        1     10   ...           1      2     1         1      2      2   \n",
       "\n",
       "      stprhedu stfdrunk stprfight stprrel  \n",
       "16577        3        2         2       1  \n",
       "19047        7        1         1       2  \n",
       "1911         3        1         1       1  \n",
       "13350        4        1         2       2  \n",
       "19034        6        1         1       2  \n",
       "17302        2        1         1       2  \n",
       "4821         4        1         1       1  \n",
       "10540        3        1         1       2  \n",
       "17116        6        1         1       2  \n",
       "140          8        1         1       2  \n",
       "8555         6        1         1       2  \n",
       "1692         3        1         1       2  \n",
       "1766         7        1         1       2  \n",
       "2342         6        1         2       2  \n",
       "107          8        1         1       2  \n",
       "2310         4        1         1       2  \n",
       "10518        4        1         1       2  \n",
       "14761        3        1         1       2  \n",
       "456          2        1         1       2  \n",
       "513          3        1         1       2  \n",
       "16979        2        1         1       2  \n",
       "14602        3        1         1       2  \n",
       "17393        3        1         1       2  \n",
       "13576        2        1         1       2  \n",
       "6256         6        1         1       2  \n",
       "6294         3        1         2       1  \n",
       "7960         6        1         1       2  \n",
       "18221        3        1         1       1  \n",
       "10788        3        1         1       2  \n",
       "13306        3        2         1       2  \n",
       "...        ...      ...       ...     ...  \n",
       "6769         3        1         1       2  \n",
       "5618         3        1         1       2  \n",
       "2131         6        1         1       1  \n",
       "2945         3        1         1       2  \n",
       "15373        6        1         1       1  \n",
       "11327        3        1         1       2  \n",
       "6420         6        1         1       2  \n",
       "183          8        1         1       2  \n",
       "18468        3        1         1       2  \n",
       "4219         9        1         1       1  \n",
       "13580        6        1         1       2  \n",
       "17896        7        2         1       2  \n",
       "18923        5        1         1       2  \n",
       "15030        7        1         1       2  \n",
       "8470         3        1         1       2  \n",
       "10945        3        1         1       2  \n",
       "1490         6        1         1       2  \n",
       "15704        3        1         1       2  \n",
       "161          4        2         1       2  \n",
       "10745        2        2         1       2  \n",
       "4953         3        1         1       2  \n",
       "4498         3        1         1       2  \n",
       "6249         3        1         1       2  \n",
       "1760         3        1         1       2  \n",
       "3098         3        1         1       1  \n",
       "3954         6        2         2       2  \n",
       "11020        3        1         2       1  \n",
       "8595         4        1         1       2  \n",
       "10881        3        1         1       2  \n",
       "3355         2        1         1       2  \n",
       "\n",
       "[1000 rows x 300 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#取1000个随机数\n",
    "df1=df.sample(1000)\n",
    "df1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "过去一年有没有住过院变量的均值为 1.900502512562814\n",
      "现在整体健康状况的均值为 4.023232323232323\n"
     ]
    }
   ],
   "source": [
    "#选择两个连续变量，这里选择的是a16过去一年有没有住过院和a17现在整体健康状况\n",
    "x1=df1['a16']\n",
    "print(\"过去一年有没有住过院变量的均值为\",x1.mean())\n",
    "x2=df1['a17']\n",
    "print(\"现在整体健康状况的均值为\",x2.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "第 1 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9235412474849094\n",
      "现在整体健康状况的均值为: 4.068686868686869\n",
      "第 2 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9133064516129032\n",
      "现在整体健康状况的均值为: 4.049645390070922\n",
      "第 3 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9116465863453815\n",
      "现在整体健康状况的均值为: 4.045317220543807\n",
      "第 4 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9139676113360324\n",
      "现在整体健康状况的均值为: 4.039354187689203\n",
      "第 5 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9193548387096775\n",
      "现在整体健康状况的均值为: 4.030333670374115\n",
      "第 6 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9182643794147325\n",
      "现在整体健康状况的均值为: 4.050352467270896\n",
      "第 7 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9196787148594376\n",
      "现在整体健康状况的均值为: 4.068479355488419\n",
      "第 8 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9257028112449799\n",
      "现在整体健康状况的均值为: 4.038152610441767\n",
      "第 9 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.905050505050505\n",
      "现在整体健康状况的均值为: 4.093023255813954\n",
      "第 10 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9196787148594376\n",
      "现在整体健康状况的均值为: 4.017119838872104\n",
      "第 11 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.921765295887663\n",
      "现在整体健康状况的均值为: 4.075528700906345\n",
      "第 12 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9163306451612903\n",
      "现在整体健康状况的均值为: 4.002004008016032\n",
      "第 13 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9174219536757302\n",
      "现在整体健康状况的均值为: 4.002014098690836\n",
      "第 14 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9214501510574018\n",
      "现在整体健康状况的均值为: 4.024316109422492\n",
      "第 15 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.907537688442211\n",
      "现在整体健康状况的均值为: 4.01314459049545\n",
      "第 16 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.932595573440644\n",
      "现在整体健康状况的均值为: 4.037298387096774\n",
      "第 17 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9147442326980944\n",
      "现在整体健康状况的均值为: 4.0181818181818185\n",
      "第 18 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9141414141414141\n",
      "现在整体健康状况的均值为: 4.032355915065723\n",
      "第 19 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9087261785356069\n",
      "现在整体健康状况的均值为: 4.076381909547739\n",
      "第 20 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.8970736629667002\n",
      "现在整体健康状况的均值为: 4.023255813953488\n",
      "第 21 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9224572004028198\n",
      "现在整体健康状况的均值为: 4.056338028169014\n",
      "第 22 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9113796576032225\n",
      "现在整体健康状况的均值为: 4.05337361530715\n",
      "第 23 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.914486921529175\n",
      "现在整体健康状况的均值为: 4.023162134944612\n",
      "第 24 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9202020202020202\n",
      "现在整体健康状况的均值为: 4.044444444444444\n",
      "第 25 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9188376753507015\n",
      "现在整体健康状况的均值为: 4.073440643863179\n",
      "第 26 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9182643794147325\n",
      "现在整体健康状况的均值为: 4.065590312815338\n",
      "第 27 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.921608040201005\n",
      "现在整体健康状况的均值为: 4.050352467270896\n",
      "第 28 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9336683417085427\n",
      "现在整体健康状况的均值为: 4.108980827447024\n",
      "第 29 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.909274193548387\n",
      "现在整体健康状况的均值为: 4.057575757575758\n",
      "第 30 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9185929648241207\n",
      "现在整体健康状况的均值为: 4.045317220543807\n"
     ]
    }
   ],
   "source": [
    "#连续上面过程30次\n",
    "mean_a16={}\n",
    "mean_a17={}\n",
    "for i in range(0,30):\n",
    "    df1=df.sample(1000)\n",
    "    print(\"第\",i+1,\"次结果\")\n",
    "    mean_a16_a=df1['a16'].mean()\n",
    "    mean_a16[i+1]= mean_a16_a\n",
    "    print(\"过去一年有没有住过院变量的均值为:\",df1['a16'].mean())\n",
    "    mean_a17_a=df1['a17'].mean()\n",
    "    mean_a17[i+1]= mean_a17_a\n",
    "    print(\"现在整体健康状况的均值为:\",df1['a17'].mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAETCAYAAADKy1riAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XmYFNW9//H3h30RcUNcETXGmLgFx4hiBBc04hJ30agYF9zQ5HdjonGNBo0m6jVqXDBu12iuaDAYV9xAghodRI1XIXEhBhQDqKCiDDPz/f1xaoZm6O4pkJ4B+byeZ57prjp96lRXV33rnFN1ShGBmZlZHm1auwBmZrbicNAwM7PcHDTMzCw3Bw0zM8vNQcPMzHJz0DBrYZIqut9JUpFp7Zbg8+0LXq+yrMpVkGe3YmW0FYODhjVLUj9Je5eYd5ukoWU+e7KkeypQpmGSTliKz50vac0y87tK6v8lylU2/0w/SdWSOmSfOVXSb5ZwOedJ6lRidl9JjzeZNk5SnxJ5XSnppOx1O2CSpPaSvgW8WO4An63vRc2U9R5JhxdMuhQ4q0x6FQYrSW0kdS23DGs5DhqWR3vgDkk9i8z7FFhQ5rNfAJ8sy8JI2oB04HmnyLx2kjoWvO/YcNCTtCHwX8CcJp/pUHD2vy5wjaRfZgerJyW9mh3k32saIJcif4BDgOcioiZ7/yjQkSayg+fvC/42K5j9GTCoxFe0FTChIJ/VgLWASSXSfwHUAERELfA8sC1wNHBzlL+Zaz7lt/8i+Wd2Bf5YJv0AUuBqCBS9gOkNNaDC7WstT765z/LIzoSfBo4EtgAafjgbkg4KnwP7ZK8fIR3U6oC1gVWBN0nBpyvwg4h4ZSnL0Q54HNgAmJ5NrgJey5bdHpgcEcdn6R8jHTAD2Ih0kJvRJNuOwHER8WL2mc7AcOAKYDQwKCJmSRoOvBkRtxeUZ4nyl9QN+BfQH3gsS18DdAb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5Zo+eXyA/jTn/7E1KlTAXjmmWd4++2mAw0vrra2Nle6vGpr0xifn3++bJ4b9dlnpR+LXlhzWLBgAQsWlHuu1ZfjoGG2ArvsssuYPn36ItPmzp3LdtttVzT9zTffzMUXX/yll3v33Xdz+umn504/aNAg3n333aLz/vGPf7DXXnvxzjvvcOqpp7Ljjjuyxx57sNlmpUcMKpdffX09P/3pT6mvTwMMT58+nQceeGCRNO+//z5XX301V199NX/7W3rwZE1NDWeffTbFLg4699xzeeeddxrTHXxw8dvPdthhByD1HQwaNIi6ujp+8IMf8PrrrxdNf+211/L73y/2XDEAPvnkE3baaafG94cddljJfA444ADGjRvH1KlTue222zjuuOOYOnUqb731VmPwWlb8PA2zZWFZN1XlvKpxm2224Yc//CFXXXUVkyZNQhL19fXMmTOH2267jT333JO1114bSbRr14727dvTpUsXIJ2RNkxfEjNnzuS8885j0003Zd999+X9999n3XXXpb6+ns8//5ynn34agH79+tGtWzfmz5/PlClTGDp0aGMeNTU1nHjiiRxxxBEMHDiQ1VdfnZdffpl58+YxcuRINtxwQwYMGLDIcvPm98ADD7DVVltx++238/jjj9O+fXvq6+sZNWoU8+bN46677uLjjz/m3XffZcGCBayxxhocccQR9OrVC4Bdd92VDz74gBtuuKGxDBMnTuSXv/wlAI8//jhdunRh8uTJAGyyySZ06JDGZO3WrRsATzzxBFtuuSU33XQT//znP3nppZfo1q0bG264IbW1tY3fefv27Rf5/pvOa8j3s88+Y9KkSdx9992NaU888UQ22mgj3nrrLTp27Mj8+fO59957efHFF5k/fz733XcftbW1nHbaaY3lWiYi4iv1t91224VZpb3++uuLTkiH+WX3twTee++9ePvtt+Oxxx6Lxx9/PB5//PH4xje+EQ899FDMnDkzbr/99th9991jr732ii233DI233zz2GuvvWL33XePe+65Z4mWVVNTEwMHDoxf/epXjdN22GGHsp8ZOnRo3HXXXUXnTZs2Lfr16xczZsyIefPmRb9+/aK+vj4iIrbffvuYMGFCTJ8+PXd+NTU1sfXWW8eQIUMapz399NNx2mmnLZLuxRdfjAsvvDD233//mD59elx33XWLzL/77rtj4sSJUVtbG6uttlr0798/ttlmmzjvvPNin332iSOOOCKGDBkSW2yxRbzxxhtx5513xne+853o3r17HHDAATF+/PgYNWpU7LrrrnHTTTfFn/70p5g2bVrMnj07dtlll9h9992jX79+QboPLfr37x+777577LLLLvH+++/HI488En379o1VV101dtlll7jxxhvjN7/5TbzzzjvxzjvvxFFHHRXPP/98REQcdthhcdZZZ0VdXV0MGDAgvva1r8XXv/716N+/fzzxxBNFv6fFfr8RAVRHjmOsaxpmK6i//OUv/PrXv2aLLbZgxIgRHH/88YwePZpu3brRvXt3Bg0aBMCQIUMYMmQIALfffjuzZs3izDPPXCSvuro6ANq2bVt0WXV1dUhi+vTp9O3blxkzZrDvvvsCMGXKFAYNGkRtbS37778/w4YNa/zc/fffz/33389bb73Frbemh/7NmTOHnXbaid/+9resv/76nHXWWVx44YWstdZa/PznP2/sqB0+fDhjxozhkEMOYb311suV3xVXXEGfPn2KNjE1VVNTwyeffMJ6661H3759+fWvf02bNm2or69n4MCBfPvb3wagT58+PPnkk4wdO5brr7+eddddlyuvvJJVV12V0047jY4dO3LUUUfRrl07rr76au6//37mz59P27ZtGT16NHvuuSfrrrsuHTumhzuOGzcOgN/97ndEBPX19Zx00kkcccQRjWUbOHAgu+yyC4MGDeLhhx9ml1124eSTT+a1115j3333pWPHjnTu3Jl7772XV155hY033pg2bdrw2Wefceed6YGGDz30EB999FGz38OSctAwW0ENGjSIffbZp7Hde7vttuPOO+/k1FNPbUxz6aWXMm7cuMYbuaZPn059fT1jx44FUof2rrvuSl1dHb/61a8am0Oaqqmp4be//S0nnngiF198MbvtthtjxoyhXbt29O3bl4cfbvr0Wxg9ejRnn302vXv35sc//nHj9Ndff50PPvig8f1+++3H3nvvzfTp0xk8eDDXXXcdbdu2Zd68eZxxxhlsueWWufMbMmQIH374IVdccQWTJk3ipJNOoqamhpkzZ/LKK6/Qv39/hg8fDkCHDh3Yf//9ufXWWxk5cmTjtNraWp566ikeffRRAF555RUGDBjAxx9/zAEHHMDRRx/NUUcdxQMPPMD8+fPp2rUrAH/4wx+YPXs2Rx55JPvvvz8333wzb7zxBm+++Sbt2rVj9OjRdO/eHYDZs2czcuTIxkBxww03sPfee7PaaqsBKXi3aZO6nLt06cLjjz9O586d+dnPfkb//v1ZsGABnTp14lvf+hZXX3114/b8/PPPefPNNwH4z3+KDS7+5TlomK2gmtYKTj75ZObOnbvItHPOOYdzzjkHSB3Ohx12GNXV1cybN6/xANbg/PPPb3aZDTWSUpdt1tfXExFMmjSJESNGcO+99zJ06FA6derUmKZDhw6Lff7QQw9lxIgRnHTSSXz22Wecdtpp7LPPPuy2224AVFdX58pvvfXWa/wOvv3tb/PCCy8wduxY7rvvPq677rrFyrvnnnsyfPhwHn30Ufbdd18uuOACHnzwQX7xi180ptl222154oknGDt2LGPHjmXTTTelbdu2vPrqq3z++ed07dqVMWPGsMoqq7DRRhux8847s8suuzB48GCOPfZYfvGLX9C7d+/G2s/8+fM56qij+OUvf8nrr79Op06dOPPMMznwwAO59957WWuttRYpY01NDauvvjr19fWsvfbaXHnlldTU1NC5c2c23HBD5s2b15j2/fffb+xYnzFjBgMHDiyzNZeOg4bZV8Smm25KfX0977//fmNTSIMvvviCk08+mZtvvpm6ujoGDhzINddcQ9++SzaU24gRIxg9ejSdO3fmgAMOAFLzVENTVV1dHQceeCBDhw7loYcearyC57LLLmvMY86cOfTv37/x/auvvsoqq6xCjx49OOqoozjwwAN54403OProo1l11VUBqKqqyp1fXg3fQ0MwWZILAn73u9/Rs2dPPv/8c7p06cKMGTO4/PLLOf744znppJPo169fY2f5m2++SYcOHTjooIMYNGgQxxxzDAMGDODcc8/lww8/pE2bNnTv3p099tiD7bffnlGjRtGjRw/GjBnDq6++yuDBg7n44os55ZRTOP744zn22GM55JBDFgmcDdZaa63G7fLCCy8s8XeSh4OG2Qrs1ltvZcaMGTzyyCMMHDiQKVOmMGTIEH7yk580ppk1axZDhgzhxBNPpGvXrowbN46BA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5CdgM6CNpwybDuyyg4M7sgprJKqQ74ncE1s4+vxHwWUTUSWojyfupLTfcEW62hCQdRRona3PSGFRXkobaOB34X9L4Vn8j3VOxAOhEGj0XYBwpeLQnXYvfFhiW/b1MujO7O+mS44+BrwEHRMQLLbBqZs1qkce9mn2VRMQfJNUCP46IAyV1JI2j9X3S2D/vRxobqz+ApNNIwz60AW6KiD825CVpHdKYT1eSgtA6pAHpziXdkXySA4YtT1zTMFsKkh4kHeRfBB4ATiSNT/Q2qSbx/YiYkw1wOIp0ZzGkARH3j4iPs3w2IA39cDTwZ1LN5FLgBdJdyJtHxDUttV5mzXFNw2wJSdqTNAzEv0hDjzwTEf8r6XbgFxExVUlH0qim5wPfBL4gjY57v6RDI2IWqf9iOKkvYxtgW9KQJqOyxT3Scmtm1jwHDbMltw5p/J9bSMOZT5A0D/gG8DVJNaRaw2GkcYQuIY1gWg/MIQ2T8qKkgyJigqSRpKHMHyEN375A0kukwfQubtE1M2uGg4bZEoqI/wGQ1CYbG6tv9v52FtY0epP6Nu7N5p0GfBERt2Tv/wj8M8vyRtKDg84jPQhqY+BbwHzSKLWlHohl1uIcNMyWXqci09oCRMRUYGqT6Y3PHY+IKdA4ZtANpL6QvqRmrNuAM4EPgPskHRkRby374pstOXeEm7UySe0iojZ7LaChBoMkhXdSW444aJiZWW6+09TMzHJz0DAzs9wcNMzMLDcHDTMzy81Bw8zMcvv/hrLo0ZwRwkcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#绘制a16过去一年有没有住院的样本均值直方图\n",
    "a16=np.arange(len(mean_a16.values()))\n",
    "width=0.5\n",
    "fig, ax = plt.subplots()\n",
    "rects1 = ax.bar(a16 - width/2, mean_a16.values(), width, \n",
    "                color='red', label='过去一年有没有住院的样本均值')\n",
    "ax.set_ylabel('样本均值')\n",
    "ax.set_xlabel(\"样本数\")\n",
    "ax.set_title('过去一年有没有住院的样本均值')\n",
    "ax.set_xticks(a16-0.25)\n",
    "ax.set_xticklabels(mean_a16.keys())\n",
    "ax.legend()\n",
    "ax.set_ylim(1.8,2)#因为数据的差别很小所以对Y轴进行处理\n",
    "def autolabel(rects, xpos='center'):\n",
    "    for rect in rects:\n",
    "        ax.text(rect.get_x() + rect.get_width()*offset[xpos], 2*a16,\n",
    "                '{}'.format(nianling), ha=ha[xpos], va='bottom')\n",
    "plt.show()\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAETCAYAAADUAmpRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XmYFNXZ9/HvPSuriDIiQlg0YgwRCAEFN0DBBUVJJMiLgsYoMSJE0VcwQlwCUSP68KrBCCoaFVSMS0AR0DAoiEGQJSjyuAR0RMISIIowM8zc7x+nZmyb7p5Bpgdhfp/r6mt6uu86daqrT91V51RXmbsjIiI1W8a+roCIiOx7SgYiIqJkICIiSgYiIoKSgYiIoGQg8p1jZpbgtaw9mL5+ojJEUlEykH3GzNaaWeOY/880s0kJ4oaZ2dUx/59sZs+kKPdBMzs47rWOZjalEnVqa2ZPVCJulZm1jvn/XDM7LEFcpTfiMTqb2Zy41+aZWYckdXnazC6MeekPwIhkhVtQL+b/DDOr+y3qKQeQb/NFFfnWzOyHwE+BEqAuMMTMCoG5wM+ApVFcBpDh7ruAM4HHYoopAoqTlN8AOAG42MzOBqYAnYBTgKZmlg9MdfcHo/iDgftjisgF+kZ71k7YYfrK3S+Pm1VR9CgzIZruV8DtUb0BXjGzP7n781GiOx34T8x0xwDnu/vfY147DlgQs0wHA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aWLl3KlClTysu44ooraNGiBR999BG5ubkUFhYybdo03n77bQoLC3n22WfZtWsXQ4YMoX79+lW6zpQMRKTK1a1bl0ceeYSmTZsC8MQTT9CqVSs6derE6NGjGTduHNdeey2DBg3itNNOo2/fvmzbto033ngDgMmTJ5Odnc348eNp3LgxU6ZMYdSoUfzzn//krLPOoqioiIKCAk455RSmT5/O/PnzOfnkk8nJyaF169aMHTuWunXrUlBQwPjx41m/fj1XXXUV2dnZNGnShEsuuYTBgwfj7hQXF5OVlUVWVhbnnnsuTZo0KT8CGThwIOeccw6vvvpq0mUtKSmhUaNGtGvXjg4dOtC7d2+WLl3KQQcdxB133MGiRYt47rnnWLNmDbfeeivvvfceXbt2ZcCAAQwfPpy+ffsCMHr0aNavX0+LFi347W9/y7HHHkuPHj24/fbbKSgoICMjg23btjF69OgqTwSgZCAiaVCrVi1yc3OZPn06AF26dGHMmDHMmTOHs88+mzlz5vDuu+/y8ssvc9ppp/Hiiy8ya9YsvvrqK7Kyshg2bFj5RvKuu+6ia9eurF27lkcffZT69evz2Wef8a9//YuMjAxatmzJySefDISjiIULF3L22WeTkZHBypUr6datG2+++SYzZsygffv2tG3blkcffZQlS5awZcsWunfvjruzdOlSunXrhrtzyy230L17dwByc3MpLi5m4sSJvPLKKwB8/vnnDBwYbnWdmZlJhw4deO2118jPz2fChAk0adKEu+++m4MOOoghQ4aQm5tLz549OfXUU+nVqxcvv/wyp556KldeeSUrV67k3HPPJTc3l9q1azNt2jSWL19Oq1atyMjIYPv27Tz+eLjp3EsvvcSWLVvSss6UDESkym3YsIEmTZrQr18/SkpK6Ny5Mx988AELFixg+PDhXH/99Zx44onceOONQOgSuuOOO7jooovIyMjg3nvvpVevXtSpU4frr7+e7du3l3efjBw5ksGDB1NcXEzfvn1p3Lhx+Xx37NhBly5dePjhh8nOzmbTpk288MILrFu3juuuu462bdsC0KpVK373u9/Rrl075s+fz7JlyzjhhBOYOXMmtWvXLi/P3Tn99NPJz89n27ZtNG7cmJkzZ/LQQw8RexXl5cuX061bN7Zu3UqfPn0YOHAgF198MX/7298oLCykbt26ZGZmkpERhmnr1KnDnDlzqF27NjfccANdu3aluLiYWrVq0aZNG8aPH09+fn75Mn344Yfln2u6aABZRKpcvXr16NatG9nZ2dSuXZtVq1bx9NNPk52dzYoVKzjvvPO47rrraNGiBbt27WLw4MGcccYZNG3alPr16zNixAh69erF2rVry0+ZfPHFF5kwYQJNmzZl8eLFfP7556xYsYJFixaVz/ezzz6jqKiIq6++mvz8fPLy8jjrrLOYMmUK3//+94GQeIYOHcqOHTvKp5szZw5du3Zl9uzZ31iO5557juOPP55atWqxdu1aDj/88ITL2759e/Lz8xk/fjwARx11FJmZmaxYsYIdO3ZQt27db8QXFRXRsGFDcnJyOOyww7j77rspKiqidu3a/PCHP6RRo0blsZ9//jkPPfQQDz30EPPmzduLtZKakoGIVLljjjmGSy+9lEsuuYQ77riDM888k7lz5/Lee++xdOlSGjVqVL6Rnzt3bvnG9tZbb+Wuu+5i6tSpDB8+nE8++aS8zK5duzJhwgSOO+44Jk2axKpVq5g+fTpTp05l3bp1QBjE7d+/P/n5+Vx00UVkZ2fz7rvvctNNN9G+ffvy+TVp0oT+/fsDYcP8zDPPMGnSJO69997yM5tKS0u5/fbbueGGG3B3XnvtNTp27Fheny+//JJUtw3+05/+RJs2bdixYwd16tShoKCAKVOmsGLFCvr378/KlSvp2rUrzZo145Zbbik/MojXqFEj+vTpQ58+fejQocNerpnk1E0kUhMMqP57ndeqVYvHHnuM0aNHk52dzfDhw7nyyit3i+vZsyeXXnophYWFPPfcc+zYsYNBgwaVn1UEYcOck5NDkyZNmDlzJlOnTuWRRx7hqquuomXLlhQVFTF//nzcneXLl7N69WrGjRvHNddcw/3338/555/PE088wS9/+UtOP/10Tj/9dJ566ilKS0sZOXIkAwYMoEWLFvTo0YMrrriCBx54gJdeeolOnTrRrFkzRowYUd6vb2aUlJQwbdo0NmzYwIgRI8rHG8q6iQCOOOIIADZv3oyZsXTpUtatW8eKFSto1qwZn3zyCffddx/t27fH3dm4cWP5EYS7U1paSklJCQ0aNCgfE9m6dSsQBq3LzoSqKkoGIlLlnnrqKSZPnszHH3/M4MGD2b59O4WFhcyYMQMIP6IaOHAgtWrVKt+7zs3Nxd0pKir6RiKAsBc+btw4brvtNlq1asWf//xnli9fzuWXX86OHTsYNWoU27dv5/bbb8fMmDp1KpdccgmdOnWiQYMGzJw5k7Fjx7Ju3Tpat25dXocFCxaQmZnJuHHjABg5ciSjR4/mww8/5Kc//Sk9e/bkggsuoF69ekyePBmATp06MWDAAHbs2MGTTz5JSUkJP/nJT5g9ezYLFy4sPyPqscceY8yYMXTu3BmA3r1707t37/Jlat68Oc2bN2fJkiX07t2bs846izp16gBQWFjIpk2b6NWrF3l5edxyyy3l07399tvs2rWr/Mimqliqw5y9KtisMfCKu/94b2LKdOzY0XWnM5HKWbVqFccee+y+rkaVcvd9comN9evXJx0rSGXLli3s2rWLvLwK7zhZZRKtdzNb4u4dk0xSLp1HBuOA2lUQIyKyz6619G0SAUDDhg2ruCbplZYBZDM7DdgOrN+bGBH59tJ11C/fTXu7vqs8GZhZDjAaGLk3MVHcYDNbbGaLN27cWLUVFTmA1apVi82bNysh1BBl9zNIdDZSZaWjm2gkMMHdt6Y4rKtMDO4+EZgIYcygqisqcqBq1qwZBQUFaCeq5ii709m3VeUDyGb2OlB23df2wLPufvmexsTTALKIyJ7bZwPI7n5qTCXygXvMbIy7j0oWU1EiEBGR9Err7wzcvVv0dFQlYkREZB/R5ShERETJQERElAxERAQlAxERQclARERQMhAREZQMREQEJQMREUHJQEREUDIQERGUDEREBCUDERFByUBERFAyEBERlAxERAQlAxERQclARERQMhAREZQMREQEJQMREUHJQEREUDIQERGUDEREBCUDERFByUBERFAyEBERlAxERAQlAxERQclARERQMhAREZQMREQEJQMREUHJQEREUDIQERGUDEREhDQmAzNrbGZLk7zXwMxmmtlsM3vezHLSVQ8REalYOo8MxgG1k7x3EXCPu58BrAfOSmM9RESkAlnpKNTMTgO2Ezb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WES1i87u5PmdmjwC3uvsaCXMJVKkcDPwR2Eq52+ryZ/dzdNxHGB8YQxgraAe0Jl8Z4LprdzOpbMpGKKRmIfO1wwvVhHiZcdnqBmX0F/AD4vpkVEfby+xGuMzOWcEXKUmAb4XIbb5vZz9x9gZk9Q7jk9EzCZbaLzewdwkXUbqvWJROpgJKBSMTd/wJgZhnRtZM6R/8/ytdHBi0JYwfToveGADvd/eHo/6nAB1GRfybckGUU4QY7rYA2QCHhqqPJbjQkUu2UDER2VyvBa5kA7r4GWBP3evl9ld19NZRfU+YBwlhDZ0J30mTgeuDfwLNmNsDdP6r66ovsOQ0gi6SJmWW5+67ouQFlRxyYmbkan3yHKBmIiIh+gSwiIkoGIiKCkoGIiKBkICIiKBmIiAjw/wETxIk5+BCaqgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#绘制a17现在整体健康状况的均值的直方图\n",
    "a17=np.arange(len(mean_a17.values()))\n",
    "width=0.5\n",
    "fig, ax = plt.subplots()\n",
    "rects1 = ax.bar(a17 - width/2, mean_a17.values(), width, \n",
    "                color='orange', label='整体健康状况的均值')\n",
    "ax.set_ylabel('样本均值')\n",
    "ax.set_xlabel('样本数')\n",
    "ax.set_title('整体健康状况的均值')\n",
    "ax.set_xticks(a17-0.25)\n",
    "ax.set_xticklabels(mean_a17.keys())\n",
    "ax.legend()\n",
    "ax.set_ylim(3.5,4.5)#同上一幅图对Y轴进行处理\n",
    "def autolabel(rects, xpos='center'):\n",
    "    for rect in rects:\n",
    "        ax.text(rect.get_x() + rect.get_width()*offset[xpos], 2*a17,\n",
    "                '{}'.format(nianling), ha=ha[xpos], va='bottom') \n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "样本均值：\n",
      "过去一年有没有住院:    1.917025\n",
      "整体健康状况:       4.046117\n",
      "dtype: float64\n",
      "样本标准误：\n",
      "过去一年有没有住院:    0.007504\n",
      "整体健康状况:       0.025703\n",
      "dtype: float64\n"
     ]
    }
   ],
   "source": [
    "#计算均值和标准误\n",
    "a16=[]\n",
    "for i in mean_a16.values():\n",
    "    a16.append(i)\n",
    "a17=[]\n",
    "for i in mean_a17.values():\n",
    "    a17.append(i)\n",
    "average={'过去一年有没有住院:':a16,\n",
    "         '整体健康状况:':a17,\n",
    "        }\n",
    "frame = pd.DataFrame(average,index=mean_a16.keys())\n",
    "print('样本均值：')\n",
    "print(frame.mean())\n",
    "print('样本标准误：')\n",
    "print(frame.std())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 回归分析"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "+ 请从CEPS.csv数据里挑选若干变量建立回归方程，要求至少三个自变量\n",
    "    + 如，学生的学业成绩受认知水平、家庭收入的影响\n",
    "    + 考虑因变量和自变量间的实质关系，变量间关系应该是有意义\n",
    "    + 选择自变量时，注意变量的类型，如果是分类变量，需要进行编码\n",
    "+ 请报告回归方程的结果，需要包括：\n",
    "    + 模型拟合指标\n",
    "    + 模型的显著性检验结果\n",
    "    + 变量的系数\n",
    "    + 各系数的显著性检验结果\n",
    "    + 对模型结果的解释\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import statsmodels.api as sm\n",
    "import statsmodels.formula.api as smf\n",
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\97657\\Anaconda3\\lib\\site-packages\\IPython\\core\\interactiveshell.py:2785: DtypeWarning: Columns (20,22,23,25,28,29,39,49,74,124,125,126,127,128,129,130,131,138,160,161,162,165,170,174,175,176,177,179,180,181,182,183,184,188,191,195,196,199,221,222,223,224,251,252,254,289,290,294,295,296) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  interactivity=interactivity, compiler=compiler, result=result)\n"
     ]
    }
   ],
   "source": [
    "sentinels = {'b1002': [' '], 'b2301': [' '], 'b2302': [' '] ,'b2308': [' '] ,'c12': [' ']}\n",
    "df = pd.read_csv('CEPS.csv',encoding='gb2312', na_values=sentinels)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>x3</th>\n",
       "      <th>x4</th>\n",
       "      <th>y</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>7870</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14779</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5662</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7477</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5375</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18275</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17767</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10498</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18337</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13089</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7673</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14909</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7247</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10371</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14320</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4502</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5552</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8429</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17134</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16726</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9147</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9051</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14463</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3199</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14316</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7459</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11978</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12893</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>462</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11423</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14381</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8369</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8939</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6237</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10051</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8788</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17712</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5244</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2434</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6343</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11134</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18483</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11447</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15309</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13816</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5900</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5147</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1861</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11760</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9140</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>824</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15658</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10299</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18033</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13339</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>500</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12398</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5306</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6031</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3039</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>959 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        x1   x2   x3   x4    y\n",
       "7870   2.0  2.0  2.0  2.0  3.0\n",
       "14779  1.0  2.0  3.0  1.0  1.0\n",
       "5662   2.0  3.0  1.0  3.0  3.0\n",
       "7477   2.0  2.0  2.0  2.0  4.0\n",
       "5375   1.0  3.0  2.0  2.0  3.0\n",
       "18275  1.0  3.0  3.0  2.0  3.0\n",
       "17767  1.0  3.0  3.0  3.0  2.0\n",
       "10498  1.0  2.0  2.0  1.0  3.0\n",
       "18337  1.0  3.0  3.0  1.0  1.0\n",
       "13089  2.0  3.0  3.0  2.0  2.0\n",
       "7673   1.0  3.0  3.0  3.0  2.0\n",
       "14909  1.0  2.0  1.0  1.0  4.0\n",
       "7247   1.0  2.0  3.0  3.0  2.0\n",
       "10371  1.0  2.0  2.0  3.0  3.0\n",
       "14320  1.0  2.0  2.0  2.0  1.0\n",
       "4502   1.0  2.0  2.0  3.0  3.0\n",
       "5552   1.0  2.0  2.0  3.0  3.0\n",
       "8429   1.0  2.0  2.0  2.0  5.0\n",
       "17134  1.0  3.0  2.0  3.0  3.0\n",
       "16726  1.0  2.0  3.0  2.0  4.0\n",
       "9147   1.0  2.0  3.0  2.0  3.0\n",
       "9051   1.0  3.0  3.0  3.0  3.0\n",
       "14463  1.0  2.0  1.0  1.0  5.0\n",
       "3199   1.0  3.0  3.0  3.0  2.0\n",
       "14316  1.0  3.0  2.0  2.0  5.0\n",
       "7459   1.0  3.0  2.0  3.0  2.0\n",
       "11978  1.0  2.0  3.0  2.0  3.0\n",
       "12893  1.0  2.0  2.0  2.0  4.0\n",
       "462    1.0  3.0  3.0  1.0  2.0\n",
       "11423  1.0  3.0  2.0  2.0  4.0\n",
       "...    ...  ...  ...  ...  ...\n",
       "14381  1.0  3.0  3.0  3.0  2.0\n",
       "8369   1.0  3.0  3.0  3.0  1.0\n",
       "8939   1.0  2.0  2.0  2.0  2.0\n",
       "6237   1.0  2.0  2.0  2.0  3.0\n",
       "10051  1.0  3.0  2.0  2.0  3.0\n",
       "8788   1.0  3.0  3.0  3.0  3.0\n",
       "17712  1.0  3.0  3.0  2.0  4.0\n",
       "5244   2.0  3.0  2.0  3.0  2.0\n",
       "2434   2.0  2.0  2.0  3.0  3.0\n",
       "6343   1.0  2.0  2.0  3.0  2.0\n",
       "11134  1.0  2.0  2.0  2.0  5.0\n",
       "18483  1.0  2.0  2.0  3.0  3.0\n",
       "11447  1.0  2.0  1.0  3.0  3.0\n",
       "15309  1.0  2.0  2.0  2.0  2.0\n",
       "13816  1.0  2.0  2.0  2.0  4.0\n",
       "5900   1.0  3.0  3.0  3.0  4.0\n",
       "5147   1.0  3.0  2.0  3.0  4.0\n",
       "1861   1.0  2.0  2.0  3.0  4.0\n",
       "11760  1.0  3.0  2.0  3.0  5.0\n",
       "9140   1.0  2.0  2.0  2.0  3.0\n",
       "824    1.0  3.0  2.0  2.0  4.0\n",
       "15658  1.0  3.0  3.0  3.0  4.0\n",
       "10299  1.0  2.0  2.0  3.0  3.0\n",
       "18033  1.0  2.0  3.0  3.0  2.0\n",
       "13339  1.0  2.0  2.0  2.0  4.0\n",
       "500    1.0  1.0  1.0  1.0  1.0\n",
       "12398  1.0  2.0  2.0  2.0  1.0\n",
       "5306   1.0  3.0  2.0  3.0  4.0\n",
       "6031   1.0  3.0  2.0  2.0  4.0\n",
       "3039   1.0  3.0  2.0  2.0  2.0\n",
       "\n",
       "[959 rows x 5 columns]"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#x1代表父母是否经常吵架\n",
    "#x2代表父母在作业考试上对你的管的严不严\n",
    "#x3代表父母在学校表现上对你的管的严不严\n",
    "#x4代表父母在上网时间对你管的严不严\n",
    "#y代表你目前的成绩在班上处于哪个层次。\n",
    "df1=df.sample(n=1000)\n",
    "T2 = pd.DataFrame({\n",
    "    'x1': df1.b1002,\n",
    "    'x2': df1.b2301,\n",
    "    'x3': df1.b2302,\n",
    "    'x4': df1.b2308,\n",
    "    'y':  df1.c12})\n",
    "T2=T2.dropna(axis=0,how='any')\n",
    "T2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "#构建自变量和因变量\n",
    "model_x= ['x1','x2','x3','x4']\n",
    "x = T2.loc[ :,model_x].values\n",
    "y=T2['y'].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.66458834, 0.55984791, 0.08689942, 0.30661477])"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#用最小二乘法进行拟合\n",
    "model = sm.OLS(y, x)  \n",
    "results = model.fit()\n",
    "results.params"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                            OLS Regression Results                            \n",
      "==============================================================================\n",
      "Dep. Variable:                      y   R-squared:                       0.865\n",
      "Model:                            OLS   Adj. R-squared:                  0.864\n",
      "Method:                 Least Squares   F-statistic:                     1514.\n",
      "Date:                Sun, 30 Dec 2018   Prob (F-statistic):               0.00\n",
      "Time:                        16:32:54   Log-Likelihood:                -1505.4\n",
      "No. Observations:                 950   AIC:                             3019.\n",
      "Df Residuals:                     946   BIC:                             3038.\n",
      "Df Model:                           4                                         \n",
      "Covariance Type:            nonrobust                                         \n",
      "==============================================================================\n",
      "                 coef    std err          t      P>|t|      [0.025      0.975]\n",
      "------------------------------------------------------------------------------\n",
      "x1             0.5298      0.092      5.733      0.000       0.348       0.711\n",
      "x2             0.5668      0.071      7.960      0.000       0.427       0.706\n",
      "x3             0.1579      0.070      2.268      0.024       0.021       0.294\n",
      "x4             0.2516      0.057      4.398      0.000       0.139       0.364\n",
      "==============================================================================\n",
      "Omnibus:                       22.320   Durbin-Watson:                   2.028\n",
      "Prob(Omnibus):                  0.000   Jarque-Bera (JB):               12.711\n",
      "Skew:                          -0.094   Prob(JB):                      0.00174\n",
      "Kurtosis:                       2.465   Cond. No.                         10.8\n",
      "==============================================================================\n",
      "\n",
      "Warnings:\n",
      "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\n"
     ]
    }
   ],
   "source": [
    "print(results.summary())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "分析： \n",
    "1.模型拟合指标:\n",
    "自变量:\n",
    "x1代表父母是否经常吵架   1=是    2=否\n",
    "x2代表父母在作业考试上对你的管的严不严    1=不管，2=管，但不严，3=管的很严\n",
    "x3代表父母在学校表现上对你的管的严不严    1=不管，2=管，但不严，3=管的很严\n",
    "x4代表父母在上网时间对你管的严不严        1=不管，2=管，但不严，3=管的很严\n",
    "因变量\n",
    "y代表你目前的成绩在班上处于哪个层次。     1=不好，2=中下，3=中等，4=中上，5=很好\n",
    "\n",
    "2.模型的显著性检验结果:该模型的P值均为小于0.05,所以在该模型中自变量有显著线性关系作用.\n",
    "\n",
    "3.变量的系数:x1的系数为0.5298,x2的系数为0.5668,x3的系数为0.1579，x4的系数为0.2516，这四个变量对因变量都有正影响，说明家里父母不吵架，父母在作业考试，学校表现，以及学生的上网时间越严格，孩子的在班中的成绩越靠前。\n",
    "\n",
    "4.各系数的显著性检验结果:在置信区间95%的情况下,x1的p值为0,x2的p值为0,x3的p值=0.024,x4的p值为0所以x1、x2、x3和x4对y的作用是显著的.\n",
    "\n",
    "5.对模型结果的解释:根据该检验结果可知,x1（代表父母是否经常吵架）、x2（父母在作业考试上对你的管的严不严）和x3（父母在学校表现上对你的管的严不严 ）和x4(父母在上网时间对你管的严不严)对y(目前的成绩在班上处于哪个层次)起显著作用."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
